import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '类型：应收 应付',
    align: "center", resizable: true,
    dataIndex: 'type'
  },
  {
    title: '金额',
    align: "center", resizable: true,
    dataIndex: 'amount'
  },
  {
    title: '记录时间',
    align: "center", resizable: true,
    dataIndex: 'statisticsTime',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '项目id',
    align: "center", resizable: true,
    dataIndex: 'projectId_dictText'
  },
];

// 高级查询数据
export const superQuerySchema = {
  type: {title: '类型：应收 应付',order: 0,view: 'text', type: 'string',},
  amount: {title: '金额',order: 1,view: 'number', type: 'number',},
  statisticsTime: {title: '记录时间',order: 2,view: 'date', type: 'string',},
  projectId: {title: '项目id',order: 3,view: 'list', type: 'string',dictTable: "c_project_application", dictCode: 'id', dictText: 'project_name',},
};
